//函数类型注解的定义
// function getTotal5(one: number, two: number): number {
//   return one + two;
// }
// const total5 = getTotal5(1, 2);

// function sayHello(): void {
//   console.log("Hello World");
// }

function errorFunction(): never {
  throw new Error();
  console.log("Hello World");
}

function forNever(): never {
  while (true) {}
  console.log("Hello World");
}

function add({ one, two }: { one: number; two: number }) {
  return one + two;
}
const total5 = add({ one: 1, two: 2 });

function getNumber({ one }: { one: number }) {
  return one;
}
const one5 = getNumber({ one: 1 });
